package J20250330_real;

/**
 * Created with IntelliJ IDEA.
 * Description: 分巧克力——https://www.lanqiao.cn/problems/99/learning/?page=1&first_category_id=1&difficulty=20&second_category_id=3
 * User: 王圆豪
 * Date: 2025-04-07
 * Time: 21:06
 */
import java.util.*;

public class Main12 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        int[] h = new int[n];
        int[] w = new int[n];
        for(int i = 0; i < n; i++){
            h[i] = scan.nextInt();
            w[i] = scan.nextInt();
        }
        int max = 100000;
        int min = 1;
        int ret = 1;
        while(min <= max) {
            int mid = (min + max)/2;
            int tmp = 0;
            for(int j = 0; j < n; j++){
                tmp += (h[j]/mid) * (w[j]/mid);
            }
            if(tmp >= k) {
                min = mid+1;
                ret = mid;
            }
            else max = mid - 1;
        }
        System.out.println(ret);
        scan.close();
    }
}
